﻿@using DAL
@model DAL.BlogPost
@{
    var session = Session["Login"] as UserCredentials;
    //bool userLoggedInAndOwnsBlog = (session != null && session.ID == Model.BlogPostedIn.Owner.UserId);
}
<div class="BlogPost">
    
    <div class="BlogPost_Title">
        <h3>@Html.ActionLink(Model.Title, "SingleBlogPost", "Blog", new { id = Model.BlogPostId }, null)<span class="Date">@Model.Created.ToShortDateString()</span>
        <span class="EditPost">@Html.ActionLink("Edit blogpost", "EditPost", "Blog", new {id = Model.BlogPostId}, null)</span><span class="EditPost">@Html.ActionLink("Delete", "DeletePost", "Blog", Model, null)</span></h3>
    </div>
    <p class="blogText">@Model.PostText</p>
</div>


